<template>
  <div>
     <h1>one</h1>
     <hr>
     <h1>直接使用仓库中的数据</h1>
     <div>名字：{{ $store.getters["home/get_name"] }}</div>
     <div>名字：{{ $store.getters["list/get_name"] }}</div>

     <hr>
     <h1>使用辅助性函数</h1>
     <div>名字：{{ homeName }}</div>
     <div>名字：{{ listName }}</div>

  </div>
</template>

<script>
import {mapGetters,mapMutations,mapActions} from "vuex"
export default {
  computed:{
    ...mapGetters({
      homeName:"home/get_name",
      listName:"list/get_name"
    })
  },  
  methods:{
    ...mapMutations({
      mutation_name:"home/mutation_name"
    })
  },
   mounted(){
    console.log(this.$store);
   }
}
</script>

<style>
</style>